//
//  QJMineInviteVC.m
//  QuanJieShopProject
//
//  Created by 刘中义 on 2018/2/26.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "QJMineInviteVC.h"

@interface QJMineInviteVC (){
    CLShareManager *shareView;
}
@property (weak, nonatomic) IBOutlet UIView *codeView;
@property (weak, nonatomic) IBOutlet UIImageView *codeImage;

@end

@implementation QJMineInviteVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"我的推广码";
    UserInfoModel *model = [QJUserInfo getCurrentUser];
    [self.codeImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@upload/%@",NET_BASEURL_IMG,model.ewm_url]] placeholderImage:[UIImage imageNamed:@"noImage"]];
    self.codeImage.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap:)];
    [self.codeImage addGestureRecognizer:tap];
    self.bottomHeight.constant = 100 * [UIScreen mainScreen].bounds.size.height / 667.0;
}

- (void)tap:(UITapGestureRecognizer *)tap
{
    shareView = [[CLShareManager alloc]init];
    UserInfoModel *model = [QJUserInfo getCurrentUser];
     [UMSocialData defaultData].extConfig.wxMessageType = UMSocialWXMessageTypeImage;
    NSString *shareUrl = [NSString stringWithFormat:@"%@%@",NET_BASEURL_IMG,model.ewm_url];
    
    [shareView setShareVC:self content:@"我的泉界推广码" image:_codeImage.image url:shareUrl];
    [shareView show];
    
}

@end
